import request from "@/utils/request";

// 查询所有
export const queryCategoryAll = () => { return request.get(`/category/list`) };

// 新增
export const addCategory = (data) => { return request.post('/category', data) };

// 根据id查询
export const queryCategoryByIdApi = (id) => { return request.get(`/category/${id}`) };

// 修改
export const updateCategory = (data) => { return request.put('/category', data) };

// 删除
export const deleteCategory = (id) => { return request.delete(`/category/${id}`) };